#include<bits/stdc++.h>
using namespace std;
int a[100010];
bool cmp(int a,int b){
    return a<b;
}
int main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    int n;
    cin>>n;
    for(int i=1;i<=n;i++)cin>>a[i];
    sort(a+1,a+1+n,cmp);
    int b=1;
    for(int i=1;i<=n;i++){
        if(a[i]>a[b]){
            b++;
        }
    }
    cout<<n-b+1;
    fclose(stdin);
    fclose(stdout);
    return 0;
}

